/**
 * @constructor
 */
function DistanceCalculatorTest() {
	
	var assert = new Assert();
	
	this.testGetDistance = function() {
		n1 = new Node(2,2,0,0);
		n2 = new Node(3,3,0,0);
		dc = new DistanceCalculator();
		calculatedDistance = dc.getDistance(n1, n2);
		expectedDistance = UNIT_SIZE * Math.sqrt(2);
		precision = 0.001;
		diff = Math.abs(calculatedDistance - expectedDistance);
		assert.assertTrue(diff < precision, "Diff between expected and calculated distances should be less than "+ diff);
	};
	
	this.testGetDistance2 = function() {
		n1 = new Node(2,2,0,0);
		n2 = new Node(3,2,0,0);
		dc = new DistanceCalculator();
		calculatedDistance = dc.getDistance(n1, n2);
		expectedDistance = UNIT_SIZE * 1;
		precision = 0.001;
		diff = Math.abs(calculatedDistance - expectedDistance);
		assert.assertTrue(diff < precision, "Diff between expected and calculated distances should be less than "+ diff);
	};
	
	this.testGetNeighbors = function() {
		area = new Area(5, 5, null, null);
		distanceCalculator = new DistanceCalculator();
		
		nodes = distanceCalculator.getNeighbors(new Node(1,1,0,0), area);
		assert.assertEquals(nodes.length, 8, "Node (1,1) should have 8 numbers, but has "+nodes.length);
	};
	
	this.testGetNeighbors2 = function() {
		area = new Area(5, 5, null, null);
		distanceCalculator = new DistanceCalculator();
		
		nodes = distanceCalculator.getNeighbors(new Node(0,0,0,0), area);
		assert.assertEquals(nodes.length, 3, "Node (0,0) should have 3 numbers, but has "+nodes.length);
	};
	
};